using System;
using System.Collections.Generic;
using System.Text;

namespace GSN.Mail.Messages
{
    class MessageMacrosReplacer
    {
        static public string replaceMacro(string template, string macro, string value)
        {
            int macroIndex = template.IndexOf(macro, StringComparison.OrdinalIgnoreCase);
            if (macroIndex < 0)
                return template;

            string res = template.Remove(macroIndex, macro.Length);
            res = res.Insert(macroIndex, value);

            return res;
        }
    }
}
